package 比那名居的桃子;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        long[] suma = new long[n + 1];
        long[] sumb = new long[n + 1];
        long[] sa = new long[n + 1];
        long[] sb = new long[n + 1];
        long start = 0, maxa = 0, minb = Integer.MAX_VALUE;
        for (int i = 1; i <= n; i++) {
            suma[i] = in.nextLong();
            suma[i] += suma[i - 1];
        }
        for (int i = 1; i <= n; i++) {
            sumb[i] = in.nextLong();
            sumb[i] += sumb[i - 1];
        }
        for (int i = 1; i <= n - k + 1; i++) {
            sa[i] = suma[i + k - 1] - suma[i - 1];
            sb[i] = sumb[i + k - 1] - sumb[i - 1];
        }
        for (int i = 1; i <= n - k + 1; i++) {
            if (sa[i] > maxa) {
                maxa = sa[i];
                start = i;
                minb = sb[i];
            } else if (sa[i] == maxa && sb[i] < minb) {
                minb = sb[i];
                start = i;
            }
        }
        System.out.println(start);
    }
}